#include <bits/stdc++.h>
using namespace std;
int main()
{
	int N,iner[1000],sign=0;
	int i,rem,t,g,n=0;
	char puter[40000];
	cin>>N;
	if (N>=3 && N<=200)
	{
		for (i=1;sign!=(N*N);i++)
		{
			cin>>iner[i];
			sign = sign + iner[i];
			rem = i;
		}
		for (t=1;t<=rem;t++)
		{
			if (t%2==0)
			{
				for (g=1;g<=iner[t];g++)
				{
					puter[n] = '1';
					n++;
				}
			}
			else
			{
				for (g=1;g<=iner[t];g++)
				{
					puter[n] = '0';
					n++;
				}
			}
		}
		for (i=0;i<(N*N);i++)
		{
			cout<<puter[i];
			if ((i+1)%N==0 && (i+1)!=(N*N)) cout<<'\n';
		}
	}
	else cout<<"Error!"<<endl;
	return 0;
}
